package com.navi.loaddata.core.gpEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.sql.Timestamp;

public class WppFdefectFPK implements Serializable {
    private String glassId;
    private Timestamp evtTimestamp;
    private String panelId;
    private int defectNo;
    private String opeId;
    private String jgeCnt;

    @Column(name = "glass_id")
    @Id
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Column(name = "evt_timestamp")
    @Id
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Column(name = "panel_id")
    @Id
    public String getPanelId() {
        return panelId;
    }

    public void setPanelId(String panelId) {
        this.panelId = panelId;
    }

    @Column(name = "defect_no")
    @Id
    public int getDefectNo() {
        return defectNo;
    }

    public void setDefectNo(int defectNo) {
        this.defectNo = defectNo;
    }

    @Column(name = "ope_id")
    @Id
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Column(name = "jge_cnt")
    @Id
    public String getJgeCnt() {
        return jgeCnt;
    }

    public void setJgeCnt(String jgeCnt) {
        this.jgeCnt = jgeCnt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WppFdefectFPK that = (WppFdefectFPK) o;

        if (defectNo != that.defectNo) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (evtTimestamp != null ? !evtTimestamp.equals(that.evtTimestamp) : that.evtTimestamp != null) return false;
        if (panelId != null ? !panelId.equals(that.panelId) : that.panelId != null) return false;
        if (opeId != null ? !opeId.equals(that.opeId) : that.opeId != null) return false;
        if (jgeCnt != null ? !jgeCnt.equals(that.jgeCnt) : that.jgeCnt != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = glassId != null ? glassId.hashCode() : 0;
        result = 31 * result + (evtTimestamp != null ? evtTimestamp.hashCode() : 0);
        result = 31 * result + (panelId != null ? panelId.hashCode() : 0);
        result = 31 * result + defectNo;
        result = 31 * result + (opeId != null ? opeId.hashCode() : 0);
        result = 31 * result + (jgeCnt != null ? jgeCnt.hashCode() : 0);
        return result;
    }
}
